<template>
	<view class="collection">
		<comHead :title="'我的收藏'" :isLeft="true" :isRight="false"></comHead>
		
		<view class="content">
			<view class="top">
				<view class="searchBox">
					<input type="text" :placeholder="'请输入剧名搜索'"/>
					<image src="https://siha.vxmeng.com/static/privacy/msearch.png" mode="widthFix"></image>
				</view>
				
				<view class="navBar">
					<view class="l">
						<view class="navItem" @click="toggle(index)" :class="type==index?'on':''" v-for="(item,index) in 8">
							<view class="text">精选</view>
						</view>
					</view>
					<image src="https://siha.vxmeng.com/static/playlet/menu.png" mode="widthFix"></image>
				</view>
			</view>
			
			<view class="list2">
				<view class="item" v-for="item in 2">
					<view class="img">
						<image src="https://siha.vxmeng.com/static/shu.jpg" mode="aspectFill"></image>
					</view>
					<view class="info">
						<view class="tit">这是剧名</view>
						<view class="intro">
							前世她是豪门千金，因家族纷争和爱情背叛，被陷害身亡。今世重生回到二十岁...
						</view>
						<view class="other">观看至第{{4}}集 / 共{{93}}集</view>
						<view class="other">{{'2024-02-01'}} 上线</view>
						<view class="btn">
							<image src="https://siha.vxmeng.com/static/playlet/sc.png" mode="widthFix"></image>
							<text>已收藏</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 0,
			}
		},
		methods: {
			toggle(e){
				this.type = e
			}
		}
	}
</script>

<style lang="less" scoped>
.collection{
	min-height: 100vh;
	width: 100vw;
	
	.content{
		padding: 0 30rpx;
		
		.top{			
			.searchBox{
				width: 100%;
				height: 80rpx;
				background: linear-gradient(97deg, #2A2832 0%, rgba(30, 36, 44, 0.65) 100%);
				display: flex;
				align-items: center;
				border-radius: 40rpx;
				padding: 0 16rpx 0 40rpx;
				input{
					flex: 1;
					height: 100%;
					
				}
				image{
					width: 40rpx;
					padding: 20rpx;
				}
			}
			
			.navBar{
				height: 48rpx;
				width: 100%;
				position: relative;
				display: flex;
				margin: 20rpx 0;
				
				.l{
					flex: 1;
					height: 100%;
					display: flex;
					overflow-x: auto;
					overflow-y: visible;
					&::-webkit-scrollbar{
						display: none;
					}
					
					.navItem{
						padding: 0 20rpx;
						flex-shrink: 0;
						color: #fff;
						font-size: 28rpx;
						opacity: .6;
						&.on{
							opacity: 1;
							font-size: 32rpx;
							position: relative;
							&::after{
								content: "";
								width: 30rpx;
								border: 3rpx solid #fff;
								position: absolute;
								bottom: 0;
								left: 50%;
								transform: translateX(-50%);
							}
						}
						.text{
							line-height: 48rpx;
						}
					}
				}
				image{
					width: 56rpx;
				}
			}
		}
		
		.list2{
			width: 100%;
			.item{
				width: 100%;
				height: 280rpx;
				border-radius: 20rpx;
				background: linear-gradient(114deg, #2A2832 0%, rgba(30, 36, 44, 0.65) 101%);
				margin-top: 20rpx;
				color: #fff;
				display: flex;
				align-items: center;
			
				overflow: hidden;
				.img{
					width: 180rpx;
					height: 240rpx;
					margin: 0 20rpx;
					image{
						width: 100%;
						height: 100%;
					}
				}
				.info{
					flex: 1;
					position: relative;
					.tit{
						font-size: 36rpx;
					}
					.intro{
						font-size: 24rpx;
						color: #999999;
						margin: 20rpx 0;
					}
					.other{
						font-size: 24rpx;
						margin-top: 10rpx;
					}
					.btn{
						position: absolute;
						bottom: 0;
						right: 0;
						font-size: 20rpx;
						width: 144rpx;
						height: 56rpx;
						margin-right: 24rpx;
						border-radius: 10rpx;
						background: linear-gradient(270deg, #5F58FD 0%, #62B6FC 100%);
						display: flex;
						justify-content: center;
						align-items: center;
						image{
							width: 24rpx;
							margin-right: 10rpx;
						}
					}
				}
			}
		}
	}
}
</style>

